package www.hszw.search.palant.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import www.hszw.search.base.message.response.ResponseResult;
import www.hszw.search.domain.service.GoodEsService;


@Slf4j
@RequestMapping("/data")
@RestController
public class DataSyncController {

    @Autowired
    GoodEsService goodEsService;

    @GetMapping(value = "/sync")
    public ResponseResult sync(String index) throws Exception {
        goodEsService.sync(index,1,10);
        return new ResponseResult();
    }

}
